/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package mailctrl;

import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author flintx
 */
public class WindowMailOperations implements MailOperations{

    public void shutDown(String appname) {
        try {
            Runtime.getRuntime().exec(appname);
        } catch (IOException ex) {
            Logger.getLogger(WindowMailOperations.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public void startUp(String appname) {
        String   command   =   "TASKKILL /F /IM ";
        command += appname;
        try {
            Runtime.getRuntime().exec(command);
        } catch (IOException ex) {
            Logger.getLogger(WindowMailOperations.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public void setPath(String appname, String apppath) {

        throw new UnsupportedOperationException("Not supported yet.");
    }
}
